GXCopyToViewDevice
You can use theGXCopyToViewDevice
function to create a copy of an existing view device object.
gxViewDevice GXCopyToViewDevice (gxViewDevice target, gxViewDevice source);
- target
- A reference to the view device to copy the source contents into. If you specify
nil
for this parameter, theGXCopyToViewDevice
function creates a new view device object.source
- A reference to the view device whose contents you want to copy.
- function result
- A reference to the view device that is a copy of the source view device.
DESCRIPTION
TheGXCopyToViewDevice
function copies the contents of an existing view device object to another, or it creates a new view device object and copies the contents of an existing view device object to it. The function copies the clip, mapping, bitmap shape (including color space, color profile reference, and color set reference), attributes, and tag list from the source view device. It clones, but does not copy, the tag objects in the tag list.In copying the bitmap, the
GXCopyToViewDevice
function does not copy the pixel image itself, just the properties of the bitmap shape. For the color set and color profile properties of the bitmap, and tag objects,GXCopyToViewDevice
copies only the references, not the objects themselves.If you specify
nil
for thetarget
parameter, theGXCopyToViewDevice
function creates a new view port object and copies the properties of the source view device into it.SPECIAL CONSIDERATIONS
If you attempt to copy to a screen device, this function posts aviewDevice_access_restricted
error.If you specify
nil
for thetarget
parameter and no error occurs, theGXCopyToViewDevice
function creates a view device object; you are responsible
for disposing of that object when you no longer need it.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory invalid_viewDevice_reference viewDevice_access_restricted (debugging version) SEE ALSO
To create a new view device that has default properties instead of being a copy of an existing view device, use theGXNewViewDevice
function, described on page 7-98.To compare two view device objects for equality, use the
GXEqualViewDevice
function, described next.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help